<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libcoap: pdu.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">libcoap<span id="projectnumber">&#160;4.2.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('pdu_8h_source.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">Loading...</div>
<div class="SRStatus" id="Searching">Searching...</div>
<div class="SRStatus" id="NoMatches">No Matches</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">pdu.h</div></div>
</div><!--header-->
<div class="contents">
<a href="pdu_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/*</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * pdu.h -- CoAP message structure</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Copyright (C) 2010-2014 Olaf Bergmann &lt;bergmann@tzi.org&gt;</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> *</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * This file is part of the CoAP library libcoap. Please see README for terms</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of use.</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> */</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#ifndef COAP_PDU_H_</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="preprocessor">#define COAP_PDU_H_</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#include &quot;<a class="code" href="uri_8h.html">uri.h</a>&quot;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="keyword">struct </span><a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a>;</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span> </div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span><span class="preprocessor">#ifdef WITH_LWIP</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#include &lt;lwip/pbuf.h&gt;</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="preprocessor">#include &lt;stdint.h&gt;</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="pdu_8h.html#a347c9249800d5f80f75dbc7d3df96bb0">   28</a></span><span class="preprocessor">#define COAP_DEFAULT_PORT      5683 </span><span class="comment">/* CoAP default UDP/TCP port */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab6e43ca6d4347d1ecb3520098adfde8a">   29</a></span><span class="preprocessor">#define COAPS_DEFAULT_PORT     5684 </span><span class="comment">/* CoAP default UDP/TCP port for secure transmission */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="pdu_8h.html#a171a87c853e3bd8ecc0d0bcd84cf3fc7">   30</a></span><span class="preprocessor">#define COAP_DEFAULT_MAX_AGE     60 </span><span class="comment">/* default maximum object lifetime in seconds */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span><span class="preprocessor">#ifndef COAP_DEFAULT_MTU</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="pdu_8h.html#acd9e29989066f01c6951113d951cd158">   32</a></span><span class="preprocessor">#define COAP_DEFAULT_MTU       1152</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_DEFAULT_MTU */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span> </div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span><span class="comment">/* TCP Message format constants, do not modify */</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0699fdab30ad7c9d875946691ce71ec5">   36</a></span><span class="preprocessor">#define COAP_MESSAGE_SIZE_OFFSET_TCP8 13</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9cf7ca17ad57bd10f72711c1dfd26816">   37</a></span><span class="preprocessor">#define COAP_MESSAGE_SIZE_OFFSET_TCP16 269 </span><span class="comment">/* 13 + 256 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="pdu_8h.html#aa60dcb2495491104cc4c0fc50267fed0">   38</a></span><span class="preprocessor">#define COAP_MESSAGE_SIZE_OFFSET_TCP32 65805 </span><span class="comment">/* 269 + 65536 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span><span class="comment">/* Derived message size limits */</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8f9814965b00b7a98ae8b2a10b8be8b6">   41</a></span><span class="preprocessor">#define COAP_MAX_MESSAGE_SIZE_TCP0 (COAP_MESSAGE_SIZE_OFFSET_TCP8-1) </span><span class="comment">/* 12 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="pdu_8h.html#a7cda9d9606a85c72bb218ab9b1fbb3a8">   42</a></span><span class="preprocessor">#define COAP_MAX_MESSAGE_SIZE_TCP8 (COAP_MESSAGE_SIZE_OFFSET_TCP16-1) </span><span class="comment">/* 268 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="pdu_8h.html#aed8d3a898b778a92637d2f2ef63d7fa3">   43</a></span><span class="preprocessor">#define COAP_MAX_MESSAGE_SIZE_TCP16 (COAP_MESSAGE_SIZE_OFFSET_TCP32-1) </span><span class="comment">/* 65804 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0c762cc5eae22d39480d4fd9d4337b1b">   44</a></span><span class="preprocessor">#define COAP_MAX_MESSAGE_SIZE_TCP32 (COAP_MESSAGE_SIZE_OFFSET_TCP32+0xFFFFFFFF)</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="preprocessor">#ifndef COAP_DEFAULT_MAX_PDU_RX_SIZE</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="preprocessor">#if defined(WITH_CONTIKI) || defined(WITH_LWIP)</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span><span class="preprocessor">#define COAP_DEFAULT_MAX_PDU_RX_SIZE (COAP_MAX_MESSAGE_SIZE_TCP16+4)</span></div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span><span class="comment">/* 8 MiB max-message-size plus some space for options */</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="pdu_8h.html#a7f6214c7fdd9c6141ef91ae6cc0262c5">   51</a></span><span class="preprocessor">#define COAP_DEFAULT_MAX_PDU_RX_SIZE (8*1024*1024+256)</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_DEFAULT_MAX_PDU_RX_SIZE */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span><span class="preprocessor">#ifndef COAP_DEBUG_BUF_SIZE</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span><span class="preprocessor">#if defined(WITH_CONTIKI) || defined(WITH_LWIP)</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span><span class="preprocessor">#define COAP_DEBUG_BUF_SIZE 128</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span><span class="preprocessor">#else </span><span class="comment">/* defined(WITH_CONTIKI) || defined(WITH_LWIP) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span><span class="comment">/* 1024 derived from RFC7252 4.6.  Message Size max payload */</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1c3a19627ef7a2960b7262bef940649a">   60</a></span><span class="preprocessor">#define COAP_DEBUG_BUF_SIZE (8 + 1024 * 2)</span></div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span><span class="preprocessor">#endif </span><span class="comment">/* defined(WITH_CONTIKI) || defined(WITH_LWIP) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_DEBUG_BUF_SIZE */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac0c672474161e3066719c36e983a0228">   64</a></span><span class="preprocessor">#define COAP_DEFAULT_VERSION      1 </span><span class="comment">/* version of CoAP supported */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="pdu_8h.html#a6801b39119117f2a09b556e2c46ac3db">   65</a></span><span class="preprocessor">#define COAP_DEFAULT_SCHEME  &quot;coap&quot; </span><span class="comment">/* the default scheme for CoAP URIs */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="pdu_8h.html#ae988ff4a542f3add75af84433693c134">   68</a></span><span class="preprocessor">#define COAP_DEFAULT_URI_WELLKNOWN &quot;.well-known/core&quot;</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span> </div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span><span class="comment">/* CoAP message types */</span></div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span> </div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab6ad49de4b14e7cf5bd0a2a1a87eef2f">   72</a></span><span class="preprocessor">#define COAP_MESSAGE_CON       0 </span><span class="comment">/* confirmable message (requires ACK/RST) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8d16c2a7f279b2b6517b38d58347dead">   73</a></span><span class="preprocessor">#define COAP_MESSAGE_NON       1 </span><span class="comment">/* non-confirmable message (one-shot message) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab2a2b75edf2611bc01464bb182e4d781">   74</a></span><span class="preprocessor">#define COAP_MESSAGE_ACK       2 </span><span class="comment">/* used to acknowledge confirmable messages */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9ca373ecc6b3ea33fa62791ce3d58c9a">   75</a></span><span class="preprocessor">#define COAP_MESSAGE_RST       3 </span><span class="comment">/* indicates error in received messages */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span><span class="comment">/* CoAP request methods */</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span> </div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad44b3aac0828f23330a1f3e7a4e4af4e">   79</a></span><span class="preprocessor">#define COAP_REQUEST_GET       1</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="pdu_8h.html#a556c2df608a7939578ab4f6097188c13">   80</a></span><span class="preprocessor">#define COAP_REQUEST_POST      2</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="pdu_8h.html#a180e6f6176662ba87fc857d3cfa97f6c">   81</a></span><span class="preprocessor">#define COAP_REQUEST_PUT       3</span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="pdu_8h.html#a6750e42d35ffae3be6a65f6fbd095a6a">   82</a></span><span class="preprocessor">#define COAP_REQUEST_DELETE    4</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab517c4f43048270f5b6fc3e9178a0b38">   83</a></span><span class="preprocessor">#define COAP_REQUEST_FETCH     5 </span><span class="comment">/* RFC 8132 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="pdu_8h.html#a26752282f6a426b8e767df6e51dc92be">   84</a></span><span class="preprocessor">#define COAP_REQUEST_PATCH     6 </span><span class="comment">/* RFC 8132 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="pdu_8h.html#a3e43a5ec86653926ce8f55ae4dd2dd3d">   85</a></span><span class="preprocessor">#define COAP_REQUEST_IPATCH    7 </span><span class="comment">/* RFC 8132 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span><span class="comment">/*</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span><span class="comment"> * CoAP option types (be sure to update coap_option_check_critical() when</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="comment"> * adding options</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span><span class="comment"> */</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"><a class="line" href="pdu_8h.html#a046abe3d186a48612d11b098c515c33e">   92</a></span><span class="preprocessor">#define COAP_OPTION_IF_MATCH        1 </span><span class="comment">/* C, opaque, 0-8 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="pdu_8h.html#a043c21277934001eacf3d14c0afb7485">   93</a></span><span class="preprocessor">#define COAP_OPTION_URI_HOST        3 </span><span class="comment">/* C, String, 1-255 B, destination address */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad8ae78716b8b32e7ced0390b77e615ec">   94</a></span><span class="preprocessor">#define COAP_OPTION_ETAG            4 </span><span class="comment">/* E, opaque, 1-8 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"><a class="line" href="pdu_8h.html#a5324af9001287706f4742f67a7efba41">   95</a></span><span class="preprocessor">#define COAP_OPTION_IF_NONE_MATCH   5 </span><span class="comment">/* empty, 0 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac422f368eb8783d6d704311ed95796db">   96</a></span><span class="preprocessor">#define COAP_OPTION_URI_PORT        7 </span><span class="comment">/* C, uint, 0-2 B, destination port */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"><a class="line" href="pdu_8h.html#a582329ddaa47c4b24ae930251dd8dac4">   97</a></span><span class="preprocessor">#define COAP_OPTION_LOCATION_PATH   8 </span><span class="comment">/* E, String, 0-255 B, - */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="pdu_8h.html#a5e932b05dd36e6becb0a689f15d07583">   98</a></span><span class="preprocessor">#define COAP_OPTION_URI_PATH       11 </span><span class="comment">/* C, String, 0-255 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0d3a394e19dd218d3dc6681bbae4cb08">   99</a></span><span class="preprocessor">#define COAP_OPTION_CONTENT_FORMAT 12 </span><span class="comment">/* E, uint, 0-2 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"><a class="line" href="pdu_8h.html#a99007567c62f8f31404111b7bb888c6e">  100</a></span><span class="preprocessor">#define COAP_OPTION_CONTENT_TYPE COAP_OPTION_CONTENT_FORMAT</span></div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad72feffdb8f533e1e97c74c626f023b5">  101</a></span><span class="preprocessor">#define COAP_OPTION_MAXAGE         14 </span><span class="comment">/* E, uint, 0--4 B, 60 Seconds */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"><a class="line" href="pdu_8h.html#a41904e7f47afc7036b2841f770240820">  102</a></span><span class="preprocessor">#define COAP_OPTION_URI_QUERY      15 </span><span class="comment">/* C, String, 1-255 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac97ca96f9b7abe9f196a72aa0ab4cfb0">  103</a></span><span class="preprocessor">#define COAP_OPTION_ACCEPT         17 </span><span class="comment">/* C, uint,   0-2 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9348303bcb32e32a0ccc2e993a5eae10">  104</a></span><span class="preprocessor">#define COAP_OPTION_LOCATION_QUERY 20 </span><span class="comment">/* E, String,   0-255 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0ef4ecdcc101e4c5ebc19c4f1c5daa3b">  105</a></span><span class="preprocessor">#define COAP_OPTION_SIZE2          28 </span><span class="comment">/* E, uint, 0-4 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="pdu_8h.html#adaa4bc1cb4312d809ecc99c8296fcef6">  106</a></span><span class="preprocessor">#define COAP_OPTION_PROXY_URI      35 </span><span class="comment">/* C, String, 1-1034 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"><a class="line" href="pdu_8h.html#a2fee152a1b03b715502c7a2db64d4f97">  107</a></span><span class="preprocessor">#define COAP_OPTION_PROXY_SCHEME   39 </span><span class="comment">/* C, String, 1-255 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8184e545628a94eeb92a360b1a3f881e">  108</a></span><span class="preprocessor">#define COAP_OPTION_SIZE1          60 </span><span class="comment">/* E, uint, 0-4 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span> </div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span><span class="comment">/* option types from RFC 7641 */</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno"><a class="line" href="pdu_8h.html#adf17a37fe3a833c8120d5414313c8655">  112</a></span><span class="preprocessor">#define COAP_OPTION_OBSERVE         6 </span><span class="comment">/* E, empty/uint, 0 B/0-3 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1438c075cb0ec2d423a85fc206a80c89">  113</a></span><span class="preprocessor">#define COAP_OPTION_SUBSCRIPTION  COAP_OPTION_OBSERVE</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span> </div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span><span class="comment">/* selected option types from RFC 7959 */</span></div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno"><a class="line" href="pdu_8h.html#a078cdb892664dd5f7ea708b7f403fa8d">  117</a></span><span class="preprocessor">#define COAP_OPTION_BLOCK2         23 </span><span class="comment">/* C, uint, 0--3 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno"><a class="line" href="pdu_8h.html#a235851793201aed201b79926c0d9377f">  118</a></span><span class="preprocessor">#define COAP_OPTION_BLOCK1         27 </span><span class="comment">/* C, uint, 0--3 B, (none) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span><span class="comment">/* selected option types from RFC 7967 */</span></div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span> </div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno"><a class="line" href="pdu_8h.html#a01d1357aea9ab79457f45e85b4f8a6ad">  122</a></span><span class="preprocessor">#define COAP_OPTION_NORESPONSE    258 </span><span class="comment">/* N, uint, 0--1 B, 0 */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab9f23bdc6d33c916f8a9ce87bf60b990">  124</a></span><span class="preprocessor">#define COAP_MAX_OPT            65535 </span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span><span class="comment">/* CoAP result codes (HTTP-Code / 100 * 40 + HTTP-Code % 100) */</span></div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span> </div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span><span class="comment">/* As of draft-ietf-core-coap-04, response codes are encoded to base</span></div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span><span class="comment"> * 32, i.e.  the three upper bits determine the response class while</span></div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span><span class="comment"> * the remaining five fine-grained information specific to that class.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span><span class="comment"> */</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno"><a class="line" href="pdu_8h.html#a651de743c1ff3168c875820cf327b1d6">  132</a></span><span class="preprocessor">#define COAP_RESPONSE_CODE(N) (((N)/100 &lt;&lt; 5) | (N)%100)</span></div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span> </div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span><span class="comment">/* Determines the class of response code C */</span></div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno"><a class="line" href="pdu_8h.html#a69a63fe3b38001521e87a71b2011750b">  135</a></span><span class="preprocessor">#define COAP_RESPONSE_CLASS(C) (((C) &gt;&gt; 5) &amp; 0xFF)</span></div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span><span class="preprocessor">#ifndef SHORT_ERROR_RESPONSE</span></div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code hl_function" href="pdu_8h.html#a0820d2413f167cd92f8267bf0aaa6ecb">coap_response_phrase</a>(<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> code);</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="pdu_8h.html#a4c38a0b197dc4908566f853af774cfdd">  150</a></span><span class="preprocessor">#define COAP_ERROR_PHRASE_LENGTH   32 </span></div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span><span class="preprocessor">#else</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span><span class="preprocessor">#define coap_response_phrase(x) ((char *)NULL)</span></div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span> </div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span><span class="preprocessor">#define COAP_ERROR_PHRASE_LENGTH    0 </span></div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="preprocessor">#endif </span><span class="comment">/* SHORT_ERROR_RESPONSE */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno">  158</span><span class="comment">/* The following definitions exist for backwards compatibility */</span></div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span><span class="preprocessor">#if 0 </span><span class="comment">/* this does not exist any more */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span><span class="preprocessor">#define COAP_RESPONSE_100      40 </span><span class="comment">/* 100 Continue */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1f7313fffc89cbc8fb3ffce8308411d1">  162</a></span><span class="preprocessor">#define COAP_RESPONSE_200      COAP_RESPONSE_CODE(200)  </span><span class="comment">/* 2.00 OK */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno"><a class="line" href="pdu_8h.html#a21848097109c00379094151e6776ead8">  163</a></span><span class="preprocessor">#define COAP_RESPONSE_201      COAP_RESPONSE_CODE(201)  </span><span class="comment">/* 2.01 Created */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab61d757c753ddd28f302f17ce44bb30c">  164</a></span><span class="preprocessor">#define COAP_RESPONSE_304      COAP_RESPONSE_CODE(203)  </span><span class="comment">/* 2.03 Valid */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="pdu_8h.html#a18ad51e8749f353e4bd3d2f08680dda0">  165</a></span><span class="preprocessor">#define COAP_RESPONSE_400      COAP_RESPONSE_CODE(400)  </span><span class="comment">/* 4.00 Bad Request */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad2f7784d510119027fc449332a010cb9">  166</a></span><span class="preprocessor">#define COAP_RESPONSE_404      COAP_RESPONSE_CODE(404)  </span><span class="comment">/* 4.04 Not Found */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno"><a class="line" href="pdu_8h.html#a444d5721d0e18cd7b83868df7ac1f85c">  167</a></span><span class="preprocessor">#define COAP_RESPONSE_405      COAP_RESPONSE_CODE(405)  </span><span class="comment">/* 4.05 Method Not Allowed */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac808e7858bd2d471a5a20d36c110e87c">  168</a></span><span class="preprocessor">#define COAP_RESPONSE_415      COAP_RESPONSE_CODE(415)  </span><span class="comment">/* 4.15 Unsupported Media Type */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="pdu_8h.html#a96033c46c68ab1fd08c655a36fea43b1">  169</a></span><span class="preprocessor">#define COAP_RESPONSE_500      COAP_RESPONSE_CODE(500)  </span><span class="comment">/* 5.00 Internal Server Error */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno"><a class="line" href="pdu_8h.html#a696b2bf2ac3f1377f9f37f33885f54ff">  170</a></span><span class="preprocessor">#define COAP_RESPONSE_501      COAP_RESPONSE_CODE(501)  </span><span class="comment">/* 5.01 Not Implemented */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1fc517df88230dd8d9967d2c9328bd08">  171</a></span><span class="preprocessor">#define COAP_RESPONSE_503      COAP_RESPONSE_CODE(503)  </span><span class="comment">/* 5.03 Service Unavailable */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno"><a class="line" href="pdu_8h.html#a71175eecbbbad57a25a8c1c438e92f21">  172</a></span><span class="preprocessor">#define COAP_RESPONSE_504      COAP_RESPONSE_CODE(504)  </span><span class="comment">/* 5.04 Gateway Timeout */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span><span class="preprocessor">#if 0  </span><span class="comment">/* these response codes do not have a valid code any more */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno">  174</span><span class="preprocessor">#  define COAP_RESPONSE_X_240    240   </span><span class="comment">/* Token Option required by server */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span><span class="preprocessor">#  define COAP_RESPONSE_X_241    241   </span><span class="comment">/* Uri-Authority Option required by server */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0510d7589c2bc0ee5767229c61f454c1">  177</a></span><span class="preprocessor">#define COAP_RESPONSE_X_242    COAP_RESPONSE_CODE(402)  </span><span class="comment">/* Critical Option not supported */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span> </div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno"><a class="line" href="pdu_8h.html#a652dc0a109bcd30123471a714af405dc">  179</a></span><span class="preprocessor">#define COAP_SIGNALING_CODE(N) (((N)/100 &lt;&lt; 5) | (N)%100)</span></div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="pdu_8h.html#a63bb73e0bfcbc80e6c4ba9e3c1f8ee32">  180</a></span><span class="preprocessor">#define COAP_SIGNALING_CSM     COAP_SIGNALING_CODE(701)</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="pdu_8h.html#adc8e9f46192e447fc87423e412a7cee7">  181</a></span><span class="preprocessor">#define COAP_SIGNALING_PING    COAP_SIGNALING_CODE(702)</span></div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno"><a class="line" href="pdu_8h.html#a3920fed2c2ffc3b40a9e495e47dfe17f">  182</a></span><span class="preprocessor">#define COAP_SIGNALING_PONG    COAP_SIGNALING_CODE(703)</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad3712b5b4c91bdacf40ae73f7f38070a">  183</a></span><span class="preprocessor">#define COAP_SIGNALING_RELEASE COAP_SIGNALING_CODE(704)</span></div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno"><a class="line" href="pdu_8h.html#af6d5cf87a33203370b28929a8364cc6a">  184</a></span><span class="preprocessor">#define COAP_SIGNALING_ABORT   COAP_SIGNALING_CODE(705)</span></div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment">/* Applies to COAP_SIGNALING_CSM */</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno"><a class="line" href="pdu_8h.html#af5bbc4f5f7dc78bec5a7a9f74d88a20d">  187</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_MAX_MESSAGE_SIZE 2</span></div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8ccd8621181b13b832efed665539dd62">  188</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_BLOCK_WISE_TRANSFER 4</span></div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span><span class="comment">/* Applies to COAP_SIGNALING_PING / COAP_SIGNALING_PONG */</span></div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno"><a class="line" href="pdu_8h.html#ab1709ea7c61e18152310b537e09b6fee">  190</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_CUSTODY 2</span></div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span><span class="comment">/* Applies to COAP_SIGNALING_RELEASE */</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0e6cc4d6c3d7399548623f421da67483">  192</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_ALTERNATIVE_ADDRESS 2</span></div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno"><a class="line" href="pdu_8h.html#ae5f2b4c5c76e860d4b8b3aefeea91881">  193</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_HOLD_OFF 4</span></div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span><span class="comment">/* Applies to COAP_SIGNALING_ABORT */</span></div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno"><a class="line" href="pdu_8h.html#af537e146bc0612471000eac95108182e">  195</a></span><span class="preprocessor">#define COAP_SIGNALING_OPTION_BAD_CSM_OPTION 2</span></div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno">  196</span> </div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span><span class="comment">/* CoAP media type encoding */</span></div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span> </div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8f565adeec61d504d063247cf31564d8">  199</a></span><span class="preprocessor">#define COAP_MEDIATYPE_TEXT_PLAIN                 0 </span><span class="comment">/* text/plain (UTF-8) */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno"><a class="line" href="pdu_8h.html#af39391900d8a44c795d391f60b0f3105">  200</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_LINK_FORMAT   40 </span><span class="comment">/* application/link-format */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno"><a class="line" href="pdu_8h.html#afa58704a0479deff4766549048c3cd73">  201</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_XML           41 </span><span class="comment">/* application/xml */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno"><a class="line" href="pdu_8h.html#a56d85f5bc844c95e4d6b584d31834a39">  202</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_OCTET_STREAM  42 </span><span class="comment">/* application/octet-stream */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0d21922336021329a000fe4680626c39">  203</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_RDF_XML       43 </span><span class="comment">/* application/rdf+xml */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno"><a class="line" href="pdu_8h.html#aa61e56376db4d93552a96e84cf37bce5">  204</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_EXI           47 </span><span class="comment">/* application/exi  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9253ed37ff9a9bcce7d91d45173ef9d8">  205</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_JSON          50 </span><span class="comment">/* application/json  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno"><a class="line" href="pdu_8h.html#a814585031d3ffce2f850d35b3bd122c9">  206</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_CBOR          60 </span><span class="comment">/* application/cbor  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span><span class="comment">/* Content formats from RFC 8152 */</span></div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1712b77da2b90eae259be8af35210de8">  209</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_SIGN     98 </span><span class="comment">/* application/cose; cose-type=&quot;cose-sign&quot;     */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno"><a class="line" href="pdu_8h.html#a4cf0068f700ffbdaa8d0f0a99ac36337">  210</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_SIGN1    18 </span><span class="comment">/* application/cose; cose-type=&quot;cose-sign1&quot;    */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno"><a class="line" href="pdu_8h.html#a09ea807fb8f9d0b9f46735bf73d20c32">  211</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT  96 </span><span class="comment">/* application/cose; cose-type=&quot;cose-encrypt&quot;  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8c95fabf7c478ef2b357f58bbb8355c5">  212</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_ENCRYPT0 16 </span><span class="comment">/* application/cose; cose-type=&quot;cose-encrypt0&quot; */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno"><a class="line" href="pdu_8h.html#a063542e8d75785db65852cbaa6d30e37">  213</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_MAC      97 </span><span class="comment">/* application/cose; cose-type=&quot;cose-mac&quot;      */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno"><a class="line" href="pdu_8h.html#a94c90ef1e2f1a2060a8d2c0e3058e1ff">  214</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_MAC0     17 </span><span class="comment">/* application/cose; cose-type=&quot;cose-mac0&quot;     */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span> </div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno"><a class="line" href="pdu_8h.html#a44c674ec60ab76dea6c7de917ee0ccf1">  216</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_KEY     101 </span><span class="comment">/* application/cose-key  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="pdu_8h.html#a33fd720e919ece23c1bf4b278ebd8a1c">  217</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_COSE_KEY_SET 102 </span><span class="comment">/* application/cose-key-set  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span> </div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span><span class="comment">/* Content formats from RFC 8428 */</span></div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9bc455497dd7ac793718f4aeeac55500">  220</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENML_JSON   110 </span><span class="comment">/* application/senml+json  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad9f5296de280952065530924899146a5">  221</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENSML_JSON  111 </span><span class="comment">/* application/sensml+json */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"><a class="line" href="pdu_8h.html#a3d9519fd08a802b488b9146009e1e296">  222</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENML_CBOR   112 </span><span class="comment">/* application/senml+cbor  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno"><a class="line" href="pdu_8h.html#afe8396fbe474c1a77f0740a8fc8daae9">  223</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENSML_CBOR  113 </span><span class="comment">/* application/sensml+cbor */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno"><a class="line" href="pdu_8h.html#a668372945883b18372fac4a508a6701f">  224</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENML_EXI    114 </span><span class="comment">/* application/senml-exi   */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno"><a class="line" href="pdu_8h.html#a06a2ca7d45aff0de1b5fc18cd487443d">  225</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENSML_EXI   115 </span><span class="comment">/* application/sensml-exi  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac691ebda475149174e5fe3ecf452db30">  226</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENML_XML    310 </span><span class="comment">/* application/senml+xml   */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="pdu_8h.html#a10cdbcc1cf8cb2a30519a1df912d7ad9">  227</a></span><span class="preprocessor">#define COAP_MEDIATYPE_APPLICATION_SENSML_XML   311 </span><span class="comment">/* application/sensml+xml  */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span> </div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span><span class="comment">/* Note that identifiers for registered media types are in the range 0-65535. We</span></div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span><span class="comment"> * use an unallocated type here and hope for the best. */</span></div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno"><a class="line" href="pdu_8h.html#a12e77b2fac590bbe39b6c1b221e371c8">  231</a></span><span class="preprocessor">#define COAP_MEDIATYPE_ANY                         0xff </span><span class="comment">/* any media type */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span> </div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">  238</a></span><span class="keyword">typedef</span> <span class="keywordtype">int</span> <a class="code hl_typedef" href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a>;</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno"><a class="line" href="pdu_8h.html#afe70beb6b87ece4aca2d2735c759c625">  241</a></span><span class="preprocessor">#define COAP_INVALID_TID -1</span></div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno">  242</span> </div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno"><a class="line" href="pdu_8h.html#a489f4c3eb8344011cbc20bd0768d14ad">  247</a></span><span class="preprocessor">#define COAP_DROPPED_RESPONSE -2</span></div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span> </div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno"><a class="line" href="pdu_8h.html#a5d4d36bdff1d1b8fe2edf092462eb2c7">  249</a></span><span class="preprocessor">#define COAP_PDU_DELAYED -3</span></div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span> </div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8c566c12a076d57856cfeaab85b56317">  251</a></span><span class="preprocessor">#define COAP_OPT_LONG 0x0F      </span><span class="comment">/* OC == 0b1111 indicates that the option list</span></div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span><span class="comment">                                 * in a CoAP message is limited by 0b11110000</span></div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad876acb5b157cdd281ddb9111b5dba1e">  253</a></span><span class="comment">                                 * marker */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span> </div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno"><a class="line" href="pdu_8h.html#ad46f0093ab0b2b969651b0d45d9bf8d0">  255</a></span><span class="preprocessor">#define COAP_OPT_END 0xF0       </span><span class="comment">/* end marker */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span> </div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span><span class="preprocessor">#define COAP_PAYLOAD_START 0xFF </span><span class="comment">/* payload marker */</span><span class="preprocessor"></span></div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span> </div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno"><a class="line" href="structcoap__option.html#a45785c6e5bd47b62e0b222a62d477f2a">  266</a></span><a class="code hl_define" href="libcoap_8h.html#a0ac5555e3d6ef821c228a03d10b334e3">COAP_DEPRECATED</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>{</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>  uint16_t key;           <span class="comment">/* the option key (no delta coding) */</span></div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span>  <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> length;</div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno"><a class="line" href="pdu_8h.html#aecdbed0794892f3f848325a2d8adb1a1">  269</a></span>} <a class="code hl_struct" href="structcoap__option.html">coap_option</a>;</div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno"><a class="line" href="pdu_8h.html#a582210d1e08294d6ec866cbe8ec5258d">  270</a></span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac9a063a34c9a4b649752a640e7d32530">  271</a></span><span class="preprocessor">#define COAP_OPTION_KEY(option) (option).key</span></div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span><span class="preprocessor">#define COAP_OPTION_LENGTH(option) (option).length</span></div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span><span class="preprocessor">#define COAP_OPTION_DATA(option) ((unsigned char *)&amp;(option) + sizeof(coap_option))</span></div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span> </div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a69c774f85355eeacc4742355527a8097">  287</a></span><span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> {</div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a07392f7f659e17d5efc74a1c0c21852e">  288</a></span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_variable" href="structcoap__pdu__t.html#a0d5796b82924c69852860053020d0684">type</a>;             </div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a8e9b3dc1dc376c0d98a5e6940953cdc2">  289</a></span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_variable" href="structcoap__pdu__t.html#a69c774f85355eeacc4742355527a8097">code</a>;             </div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a8c05f6d455ff81d7751ddb61233a455b">  290</a></span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_variable" href="structcoap__pdu__t.html#a07392f7f659e17d5efc74a1c0c21852e">max_hdr_size</a>;     </div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a65877a685b1f3428d3dc872af075ddc1">  291</a></span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_variable" href="structcoap__pdu__t.html#a8e9b3dc1dc376c0d98a5e6940953cdc2">hdr_size</a>;         </div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a9b6c14a84f46820634c4dd3059c73b20">  292</a></span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_variable" href="structcoap__pdu__t.html#a8c05f6d455ff81d7751ddb61233a455b">token_length</a>;     </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#ad526a13d4c00b670d67f557245c2236c">  293</a></span>  uint16_t <a class="code hl_variable" href="structcoap__pdu__t.html#a65877a685b1f3428d3dc872af075ddc1">tid</a>;             </div>
<div class="line"><a id="l00294" name="l00294"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#ac5018459a3078a5b896119d7464cb273">  294</a></span>  uint16_t <a class="code hl_variable" href="structcoap__pdu__t.html#a9b6c14a84f46820634c4dd3059c73b20">max_delta</a>;       </div>
<div class="line"><a id="l00295" name="l00295"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a5bd82194d62c90d9243313cbbbe26d47">  295</a></span>  <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structcoap__pdu__t.html#ad526a13d4c00b670d67f557245c2236c">alloc_size</a>;        </div>
<div class="line"><a id="l00296" name="l00296"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a3c42c790abb815d722fbebcd7702a200">  296</a></span>  <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structcoap__pdu__t.html#ac5018459a3078a5b896119d7464cb273">used_size</a>;         </div>
<div class="line"><a id="l00297" name="l00297"></a><span class="lineno"><a class="line" href="structcoap__pdu__t.html#a98ab43bf0f4eceae19535c5a10016111">  297</a></span>  <span class="keywordtype">size_t</span> <a class="code hl_variable" href="structcoap__pdu__t.html#a5bd82194d62c90d9243313cbbbe26d47">max_size</a>;          </div>
<div class="line"><a id="l00298" name="l00298"></a><span class="lineno">  298</span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *<a class="code hl_variable" href="structcoap__pdu__t.html#a3c42c790abb815d722fbebcd7702a200">token</a>;           </div>
<div class="line"><a id="l00299" name="l00299"></a><span class="lineno">  299</span>  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *<a class="code hl_variable" href="structcoap__pdu__t.html#a98ab43bf0f4eceae19535c5a10016111">data</a>;            </div>
<div class="line"><a id="l00300" name="l00300"></a><span class="lineno">  300</span><span class="preprocessor">#ifdef WITH_LWIP</span></div>
<div class="line"><a id="l00301" name="l00301"></a><span class="lineno">  301</span>  <span class="keyword">struct </span>pbuf *pbuf;        </div>
<div class="line"><a id="l00309" name="l00309"></a><span class="lineno">  309</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00310" name="l00310"></a><span class="lineno"><a class="line" href="pdu_8h.html#a7736ba4d5c9603785584582e1b4c9f94">  310</a></span>} <a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a>;</div>
<div class="line"><a id="l00311" name="l00311"></a><span class="lineno"><a class="line" href="pdu_8h.html#ae2fb86807d5c6e38795a45b5c6c4374f">  311</a></span> </div>
<div class="line"><a id="l00312" name="l00312"></a><span class="lineno"><a class="line" href="pdu_8h.html#a0010b10bed3bccbb58cf47640ca61271">  312</a></span><span class="preprocessor">#define COAP_PDU_IS_EMPTY(pdu)     ((pdu)-&gt;code == 0)</span></div>
<div class="line"><a id="l00313" name="l00313"></a><span class="lineno"><a class="line" href="pdu_8h.html#a8046a72f69381eb21e87ece231506137">  313</a></span><span class="preprocessor">#define COAP_PDU_IS_REQUEST(pdu)   (!COAP_PDU_IS_EMPTY(pdu) &amp;&amp; (pdu)-&gt;code &lt; 32)</span></div>
<div class="line"><a id="l00314" name="l00314"></a><span class="lineno">  314</span><span class="preprocessor">#define COAP_PDU_IS_RESPONSE(pdu)  ((pdu)-&gt;code &gt;= 64 &amp;&amp; (pdu)-&gt;code &lt; 224)</span></div>
<div class="line"><a id="l00315" name="l00315"></a><span class="lineno"><a class="line" href="pdu_8h.html#a3ad0069e1ed066d9f49b570446a9b847">  315</a></span><span class="preprocessor">#define COAP_PDU_IS_SIGNALING(pdu) ((pdu)-&gt;code &gt;= 224)</span></div>
<div class="line"><a id="l00316" name="l00316"></a><span class="lineno"><a class="line" href="pdu_8h.html#a682638452038ffdfbf08ce4875f95a2f">  316</a></span> </div>
<div class="line"><a id="l00317" name="l00317"></a><span class="lineno">  317</span><span class="preprocessor">#define COAP_PDU_MAX_UDP_HEADER_SIZE 4</span></div>
<div class="line"><a id="l00318" name="l00318"></a><span class="lineno">  318</span><span class="preprocessor">#define COAP_PDU_MAX_TCP_HEADER_SIZE 6</span></div>
<div class="line"><a id="l00319" name="l00319"></a><span class="lineno">  319</span> </div>
<div class="line"><a id="l00320" name="l00320"></a><span class="lineno">  320</span><span class="preprocessor">#ifdef WITH_LWIP</span></div>
<div class="line"><a id="l00336" name="l00336"></a><span class="lineno">  336</span><a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> * coap_pdu_from_pbuf(<span class="keyword">struct</span> pbuf *pbuf);</div>
<div class="line"><a id="l00337" name="l00337"></a><span class="lineno"><a class="line" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">  337</a></span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00338" name="l00338"></a><span class="lineno">  338</span> </div>
<div class="line"><a id="l00339" name="l00339"></a><span class="lineno">  339</span><span class="keyword">typedef</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> <a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a>;</div>
<div class="line"><a id="l00343" name="l00343"></a><span class="lineno"><a class="line" href="pdu_8h.html#ac10ea7ae66e5e549b47854417311b560">  343</a></span><span class="preprocessor">#define COAP_PROTO_NONE         0</span></div>
<div class="line"><a id="l00344" name="l00344"></a><span class="lineno"><a class="line" href="pdu_8h.html#a1dd5fe6cc335ea31d49f3eb469a5990a">  344</a></span><span class="preprocessor">#define COAP_PROTO_UDP          1</span></div>
<div class="line"><a id="l00345" name="l00345"></a><span class="lineno"><a class="line" href="pdu_8h.html#a6c9a1dd7b311e5a420e3a7c36b918a02">  345</a></span><span class="preprocessor">#define COAP_PROTO_DTLS         2</span></div>
<div class="line"><a id="l00346" name="l00346"></a><span class="lineno">  346</span><span class="preprocessor">#define COAP_PROTO_TCP          3</span></div>
<div class="line"><a id="l00347" name="l00347"></a><span class="lineno">  347</span><span class="preprocessor">#define COAP_PROTO_TLS          4</span></div>
<div class="line"><a id="l00348" name="l00348"></a><span class="lineno">  348</span> </div>
<div class="line"><a id="l00363" name="l00363"></a><span class="lineno">  363</span><a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *</div>
<div class="line"><a id="l00364" name="l00364"></a><span class="lineno">  364</span><a class="code hl_function" href="pdu_8h.html#a4f019ad11b0f633524175488aecbd7d1">coap_pdu_init</a>(<a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> type, <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> code, uint16_t tid, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00365" name="l00365"></a><span class="lineno">  365</span> </div>
<div class="line"><a id="l00375" name="l00375"></a><span class="lineno">  375</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#add46ce956878a4121e8887b84c6d4a6b">coap_pdu_resize</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <span class="keywordtype">size_t</span> new_size);</div>
<div class="line"><a id="l00376" name="l00376"></a><span class="lineno">  376</span> </div>
<div class="line"><a id="l00383" name="l00383"></a><span class="lineno">  383</span><span class="keywordtype">void</span> <a class="code hl_function" href="pdu_8h.html#a9dbdf354e2da5e80fea4c0d4a8df6d05">coap_pdu_clear</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <span class="keywordtype">size_t</span> size);</div>
<div class="line"><a id="l00384" name="l00384"></a><span class="lineno">  384</span> </div>
<div class="line"><a id="l00388" name="l00388"></a><span class="lineno">  388</span><a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *<a class="code hl_function" href="pdu_8h.html#ade1a728d3049d57703d805e71d0a38dd">coap_new_pdu</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code hl_struct" href="structcoap__session__t.html">coap_session_t</a> *session);</div>
<div class="line"><a id="l00389" name="l00389"></a><span class="lineno">  389</span> </div>
<div class="line"><a id="l00397" name="l00397"></a><span class="lineno">  397</span><span class="keywordtype">void</span> <a class="code hl_function" href="pdu_8h.html#aad4941e111fdd57ed08b614bb9e7f594">coap_delete_pdu</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *);</div>
<div class="line"><a id="l00398" name="l00398"></a><span class="lineno">  398</span> </div>
<div class="line"><a id="l00408" name="l00408"></a><span class="lineno">  408</span><span class="keywordtype">size_t</span> <a class="code hl_function" href="pdu_8h.html#a53c48f11ca3bc0d2106bd8b76f7430c8">coap_pdu_parse_header_size</a>(<a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto,</div>
<div class="line"><a id="l00409" name="l00409"></a><span class="lineno">  409</span>                                 <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data);</div>
<div class="line"><a id="l00410" name="l00410"></a><span class="lineno">  410</span> </div>
<div class="line"><a id="l00422" name="l00422"></a><span class="lineno">  422</span><span class="keywordtype">size_t</span> <a class="code hl_function" href="pdu_8h.html#ad9460a91b9a9747bc85ff8e48a00f4d1">coap_pdu_parse_size</a>(<a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto,</div>
<div class="line"><a id="l00423" name="l00423"></a><span class="lineno">  423</span>                           <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data,</div>
<div class="line"><a id="l00424" name="l00424"></a><span class="lineno">  424</span>                           <span class="keywordtype">size_t</span> length);</div>
<div class="line"><a id="l00425" name="l00425"></a><span class="lineno">  425</span> </div>
<div class="line"><a id="l00433" name="l00433"></a><span class="lineno">  433</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#a516ac8dae1f2fe33963f80cf15ec59a0">coap_pdu_parse_header</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto);</div>
<div class="line"><a id="l00434" name="l00434"></a><span class="lineno">  434</span> </div>
<div class="line"><a id="l00446" name="l00446"></a><span class="lineno">  446</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#aa7fbcbe0f8d7415e82447747abf31d51">coap_pdu_parse_opt</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu);</div>
<div class="line"><a id="l00447" name="l00447"></a><span class="lineno">  447</span> </div>
<div class="line"><a id="l00462" name="l00462"></a><span class="lineno">  462</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#ab9981ea277da8bc4e5c4f82d6ca4c006">coap_pdu_parse</a>(<a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto,</div>
<div class="line"><a id="l00463" name="l00463"></a><span class="lineno">  463</span>                   <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data,</div>
<div class="line"><a id="l00464" name="l00464"></a><span class="lineno">  464</span>                   <span class="keywordtype">size_t</span> length,</div>
<div class="line"><a id="l00465" name="l00465"></a><span class="lineno">  465</span>                   <a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu);</div>
<div class="line"><a id="l00479" name="l00479"></a><span class="lineno">  479</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#a923f81168ccbbaac1a4ca50837d7be94">coap_add_token</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu,</div>
<div class="line"><a id="l00480" name="l00480"></a><span class="lineno">  480</span>                  <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a id="l00481" name="l00481"></a><span class="lineno">  481</span>                  <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data);</div>
<div class="line"><a id="l00482" name="l00482"></a><span class="lineno">  482</span> </div>
<div class="line"><a id="l00491" name="l00491"></a><span class="lineno">  491</span><span class="keywordtype">size_t</span> <a class="code hl_function" href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae">coap_add_option</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu,</div>
<div class="line"><a id="l00492" name="l00492"></a><span class="lineno">  492</span>                       uint16_t type,</div>
<div class="line"><a id="l00493" name="l00493"></a><span class="lineno">  493</span>                       <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a id="l00494" name="l00494"></a><span class="lineno">  494</span>                       <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data);</div>
<div class="line"><a id="l00495" name="l00495"></a><span class="lineno">  495</span> </div>
<div class="line"><a id="l00503" name="l00503"></a><span class="lineno">  503</span><a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *<a class="code hl_function" href="pdu_8h.html#a47b43066ecb3584af0c425b8ee97db20">coap_add_option_later</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu,</div>
<div class="line"><a id="l00504" name="l00504"></a><span class="lineno">  504</span>                               uint16_t type,</div>
<div class="line"><a id="l00505" name="l00505"></a><span class="lineno">  505</span>                               <span class="keywordtype">size_t</span> len);</div>
<div class="line"><a id="l00506" name="l00506"></a><span class="lineno">  506</span> </div>
<div class="line"><a id="l00512" name="l00512"></a><span class="lineno">  512</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#af71a3f810ab9f0f657c25c425826af40">coap_add_data</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu,</div>
<div class="line"><a id="l00513" name="l00513"></a><span class="lineno">  513</span>                  <span class="keywordtype">size_t</span> len,</div>
<div class="line"><a id="l00514" name="l00514"></a><span class="lineno">  514</span>                  <span class="keyword">const</span> <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *data);</div>
<div class="line"><a id="l00515" name="l00515"></a><span class="lineno">  515</span> </div>
<div class="line"><a id="l00523" name="l00523"></a><span class="lineno">  523</span><a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> *<a class="code hl_function" href="pdu_8h.html#a3b73fa26504e7a8da604375d1146b7e3">coap_add_data_after</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <span class="keywordtype">size_t</span> len);</div>
<div class="line"><a id="l00524" name="l00524"></a><span class="lineno">  524</span> </div>
<div class="line"><a id="l00530" name="l00530"></a><span class="lineno">  530</span><span class="keywordtype">int</span> <a class="code hl_function" href="pdu_8h.html#a6701e5ec876a5ce59c7892f66d46c67b">coap_get_data</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu,</div>
<div class="line"><a id="l00531" name="l00531"></a><span class="lineno">  531</span>                  <span class="keywordtype">size_t</span> *len,</div>
<div class="line"><a id="l00532" name="l00532"></a><span class="lineno">  532</span>                  <a class="code hl_typedef" href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> **data);</div>
<div class="line"><a id="l00533" name="l00533"></a><span class="lineno">  533</span> </div>
<div class="line"><a id="l00541" name="l00541"></a><span class="lineno">  541</span><span class="keywordtype">size_t</span> <a class="code hl_function" href="pdu_8h.html#ab5e81fe5717f977c62b7ef427d946c35">coap_pdu_encode_header</a>(<a class="code hl_struct" href="structcoap__pdu__t.html">coap_pdu_t</a> *pdu, <a class="code hl_typedef" href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a> proto);</div>
<div class="line"><a id="l00542" name="l00542"></a><span class="lineno">  542</span> </div>
<div class="line"><a id="l00543" name="l00543"></a><span class="lineno">  543</span><span class="preprocessor">#endif </span><span class="comment">/* COAP_PDU_H_ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="alibcoap_8h_html_a0ac5555e3d6ef821c228a03d10b334e3"><div class="ttname"><a href="libcoap_8h.html#a0ac5555e3d6ef821c228a03d10b334e3">COAP_DEPRECATED</a></div><div class="ttdeci">#define COAP_DEPRECATED</div><div class="ttdef"><b>Definition</b> <a href="libcoap_8h_source.html#l00049">libcoap.h:49</a></div></div>
<div class="ttc" id="apdu_8h_html_a0820d2413f167cd92f8267bf0aaa6ecb"><div class="ttname"><a href="pdu_8h.html#a0820d2413f167cd92f8267bf0aaa6ecb">coap_response_phrase</a></div><div class="ttdeci">const char * coap_response_phrase(unsigned char code)</div><div class="ttdoc">Returns a human-readable response phrase for the specified CoAP response code.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00384">pdu.c:384</a></div></div>
<div class="ttc" id="apdu_8h_html_a3b73fa26504e7a8da604375d1146b7e3"><div class="ttname"><a href="pdu_8h.html#a3b73fa26504e7a8da604375d1146b7e3">coap_add_data_after</a></div><div class="ttdeci">uint8_t * coap_add_data_after(coap_pdu_t *pdu, size_t len)</div><div class="ttdoc">Adds given data to the pdu that is passed as first parameter but does not copyt it.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00314">pdu.c:314</a></div></div>
<div class="ttc" id="apdu_8h_html_a47b43066ecb3584af0c425b8ee97db20"><div class="ttname"><a href="pdu_8h.html#a47b43066ecb3584af0c425b8ee97db20">coap_add_option_later</a></div><div class="ttdeci">uint8_t * coap_add_option_later(coap_pdu_t *pdu, uint16_t type, size_t len)</div><div class="ttdoc">Adds option of given type to pdu that is passed as first parameter, but does not write a value.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00266">pdu.c:266</a></div></div>
<div class="ttc" id="apdu_8h_html_a4f019ad11b0f633524175488aecbd7d1"><div class="ttname"><a href="pdu_8h.html#a4f019ad11b0f633524175488aecbd7d1">coap_pdu_init</a></div><div class="ttdeci">coap_pdu_t * coap_pdu_init(uint8_t type, uint8_t code, uint16_t tid, size_t size)</div><div class="ttdoc">Creates a new CoAP PDU with at least enough storage space for the given size maximum message size.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00091">pdu.c:91</a></div></div>
<div class="ttc" id="apdu_8h_html_a516ac8dae1f2fe33963f80cf15ec59a0"><div class="ttname"><a href="pdu_8h.html#a516ac8dae1f2fe33963f80cf15ec59a0">coap_pdu_parse_header</a></div><div class="ttdeci">int coap_pdu_parse_header(coap_pdu_t *pdu, coap_proto_t proto)</div><div class="ttdoc">Decode the protocol specific header for the specified PDU.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00474">pdu.c:474</a></div></div>
<div class="ttc" id="apdu_8h_html_a53c48f11ca3bc0d2106bd8b76f7430c8"><div class="ttname"><a href="pdu_8h.html#a53c48f11ca3bc0d2106bd8b76f7430c8">coap_pdu_parse_header_size</a></div><div class="ttdeci">size_t coap_pdu_parse_header_size(coap_proto_t proto, const uint8_t *data)</div><div class="ttdoc">Interprets data to determine the number of bytes in the header.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00419">pdu.c:419</a></div></div>
<div class="ttc" id="apdu_8h_html_a6701e5ec876a5ce59c7892f66d46c67b"><div class="ttname"><a href="pdu_8h.html#a6701e5ec876a5ce59c7892f66d46c67b">coap_get_data</a></div><div class="ttdeci">int coap_get_data(const coap_pdu_t *pdu, size_t *len, uint8_t **data)</div><div class="ttdoc">Retrieves the length and data pointer of specified PDU.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00332">pdu.c:332</a></div></div>
<div class="ttc" id="apdu_8h_html_a923f81168ccbbaac1a4ca50837d7be94"><div class="ttname"><a href="pdu_8h.html#a923f81168ccbbaac1a4ca50837d7be94">coap_add_token</a></div><div class="ttdeci">int coap_add_token(coap_pdu_t *pdu, size_t len, const uint8_t *data)</div><div class="ttdoc">Adds token of length len to pdu.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00205">pdu.c:205</a></div></div>
<div class="ttc" id="apdu_8h_html_a9dbdf354e2da5e80fea4c0d4a8df6d05"><div class="ttname"><a href="pdu_8h.html#a9dbdf354e2da5e80fea4c0d4a8df6d05">coap_pdu_clear</a></div><div class="ttdeci">void coap_pdu_clear(coap_pdu_t *pdu, size_t size)</div><div class="ttdoc">Clears any contents from pdu and resets used_size, and data pointers.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00046">pdu.c:46</a></div></div>
<div class="ttc" id="apdu_8h_html_a9f23fe72ad67820dcdf888bb8b619dde"><div class="ttname"><a href="pdu_8h.html#a9f23fe72ad67820dcdf888bb8b619dde">coap_proto_t</a></div><div class="ttdeci">uint8_t coap_proto_t</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00337">pdu.h:337</a></div></div>
<div class="ttc" id="apdu_8h_html_aa1314f60fbc25733cfabaa975adc5aae"><div class="ttname"><a href="pdu_8h.html#aa1314f60fbc25733cfabaa975adc5aae">coap_add_option</a></div><div class="ttdeci">size_t coap_add_option(coap_pdu_t *pdu, uint16_t type, size_t len, const uint8_t *data)</div><div class="ttdoc">Adds option of given type to pdu that is passed as first parameter.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00229">pdu.c:229</a></div></div>
<div class="ttc" id="apdu_8h_html_aa7fbcbe0f8d7415e82447747abf31d51"><div class="ttname"><a href="pdu_8h.html#aa7fbcbe0f8d7415e82447747abf31d51">coap_pdu_parse_opt</a></div><div class="ttdeci">int coap_pdu_parse_opt(coap_pdu_t *pdu)</div><div class="ttdoc">Verify consistency in the given CoAP PDU structure and locate the data.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00506">pdu.c:506</a></div></div>
<div class="ttc" id="apdu_8h_html_aad4941e111fdd57ed08b614bb9e7f594"><div class="ttname"><a href="pdu_8h.html#aad4941e111fdd57ed08b614bb9e7f594">coap_delete_pdu</a></div><div class="ttdeci">void coap_delete_pdu(coap_pdu_t *)</div><div class="ttdoc">Dispose of an CoAP PDU and frees associated storage.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00141">pdu.c:141</a></div></div>
<div class="ttc" id="apdu_8h_html_ab5e81fe5717f977c62b7ef427d946c35"><div class="ttname"><a href="pdu_8h.html#ab5e81fe5717f977c62b7ef427d946c35">coap_pdu_encode_header</a></div><div class="ttdeci">size_t coap_pdu_encode_header(coap_pdu_t *pdu, coap_proto_t proto)</div><div class="ttdoc">Compose the protocol specific header for the specified PDU.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00582">pdu.c:582</a></div></div>
<div class="ttc" id="apdu_8h_html_ab9981ea277da8bc4e5c4f82d6ca4c006"><div class="ttname"><a href="pdu_8h.html#ab9981ea277da8bc4e5c4f82d6ca4c006">coap_pdu_parse</a></div><div class="ttdeci">int coap_pdu_parse(coap_proto_t proto, const uint8_t *data, size_t length, coap_pdu_t *pdu)</div><div class="ttdoc">Parses data into the CoAP PDU structure given in result.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00557">pdu.c:557</a></div></div>
<div class="ttc" id="apdu_8h_html_ac60fb9284ace878df3db4a2d621d9a8d"><div class="ttname"><a href="pdu_8h.html#ac60fb9284ace878df3db4a2d621d9a8d">coap_tid_t</a></div><div class="ttdeci">int coap_tid_t</div><div class="ttdoc">coap_tid_t is used to store CoAP transaction id, i.e.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00238">pdu.h:238</a></div></div>
<div class="ttc" id="apdu_8h_html_ad9460a91b9a9747bc85ff8e48a00f4d1"><div class="ttname"><a href="pdu_8h.html#ad9460a91b9a9747bc85ff8e48a00f4d1">coap_pdu_parse_size</a></div><div class="ttdeci">size_t coap_pdu_parse_size(coap_proto_t proto, const uint8_t *data, size_t length)</div><div class="ttdoc">Parses data to extract the message size.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00442">pdu.c:442</a></div></div>
<div class="ttc" id="apdu_8h_html_add46ce956878a4121e8887b84c6d4a6b"><div class="ttname"><a href="pdu_8h.html#add46ce956878a4121e8887b84c6d4a6b">coap_pdu_resize</a></div><div class="ttdeci">int coap_pdu_resize(coap_pdu_t *pdu, size_t new_size)</div><div class="ttdoc">Dynamically grows the size of pdu to new_size.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00154">pdu.c:154</a></div></div>
<div class="ttc" id="apdu_8h_html_ade1a728d3049d57703d805e71d0a38dd"><div class="ttname"><a href="pdu_8h.html#ade1a728d3049d57703d805e71d0a38dd">coap_new_pdu</a></div><div class="ttdeci">coap_pdu_t * coap_new_pdu(const struct coap_session_t *session)</div><div class="ttdoc">Creates a new CoAP PDU.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00131">pdu.c:131</a></div></div>
<div class="ttc" id="apdu_8h_html_af71a3f810ab9f0f657c25c425826af40"><div class="ttname"><a href="pdu_8h.html#af71a3f810ab9f0f657c25c425826af40">coap_add_data</a></div><div class="ttdeci">int coap_add_data(coap_pdu_t *pdu, size_t len, const uint8_t *data)</div><div class="ttdoc">Adds given data to the pdu that is passed as first parameter.</div><div class="ttdef"><b>Definition</b> <a href="pdu_8c_source.html#l00302">pdu.c:302</a></div></div>
<div class="ttc" id="astructcoap__option_html"><div class="ttname"><a href="structcoap__option.html">coap_option</a></div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00264">pdu.h:264</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html"><div class="ttname"><a href="structcoap__pdu__t.html">coap_pdu_t</a></div><div class="ttdoc">structure for CoAP PDUs token, if any, follows the fixed size header, then options until payload mark...</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00285">pdu.h:285</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a07392f7f659e17d5efc74a1c0c21852e"><div class="ttname"><a href="structcoap__pdu__t.html#a07392f7f659e17d5efc74a1c0c21852e">coap_pdu_t::max_hdr_size</a></div><div class="ttdeci">uint8_t max_hdr_size</div><div class="ttdoc">space reserved for protocol-specific header</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00288">pdu.h:288</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a0d5796b82924c69852860053020d0684"><div class="ttname"><a href="structcoap__pdu__t.html#a0d5796b82924c69852860053020d0684">coap_pdu_t::type</a></div><div class="ttdeci">uint8_t type</div><div class="ttdoc">message type</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00286">pdu.h:286</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a3c42c790abb815d722fbebcd7702a200"><div class="ttname"><a href="structcoap__pdu__t.html#a3c42c790abb815d722fbebcd7702a200">coap_pdu_t::token</a></div><div class="ttdeci">uint8_t * token</div><div class="ttdoc">first byte of token, if any, or options</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00296">pdu.h:296</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a5bd82194d62c90d9243313cbbbe26d47"><div class="ttname"><a href="structcoap__pdu__t.html#a5bd82194d62c90d9243313cbbbe26d47">coap_pdu_t::max_size</a></div><div class="ttdeci">size_t max_size</div><div class="ttdoc">maximum size for token, options and payload, or zero for variable size pdu</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00295">pdu.h:295</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a65877a685b1f3428d3dc872af075ddc1"><div class="ttname"><a href="structcoap__pdu__t.html#a65877a685b1f3428d3dc872af075ddc1">coap_pdu_t::tid</a></div><div class="ttdeci">uint16_t tid</div><div class="ttdoc">transaction id, if any, in regular host byte order</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00291">pdu.h:291</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a69c774f85355eeacc4742355527a8097"><div class="ttname"><a href="structcoap__pdu__t.html#a69c774f85355eeacc4742355527a8097">coap_pdu_t::code</a></div><div class="ttdeci">uint8_t code</div><div class="ttdoc">request method (value 1–10) or response code (value 40-255)</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00287">pdu.h:287</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a8c05f6d455ff81d7751ddb61233a455b"><div class="ttname"><a href="structcoap__pdu__t.html#a8c05f6d455ff81d7751ddb61233a455b">coap_pdu_t::token_length</a></div><div class="ttdeci">uint8_t token_length</div><div class="ttdoc">length of Token</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00290">pdu.h:290</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a8e9b3dc1dc376c0d98a5e6940953cdc2"><div class="ttname"><a href="structcoap__pdu__t.html#a8e9b3dc1dc376c0d98a5e6940953cdc2">coap_pdu_t::hdr_size</a></div><div class="ttdeci">uint8_t hdr_size</div><div class="ttdoc">actaul size used for protocol-specific header</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00289">pdu.h:289</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a98ab43bf0f4eceae19535c5a10016111"><div class="ttname"><a href="structcoap__pdu__t.html#a98ab43bf0f4eceae19535c5a10016111">coap_pdu_t::data</a></div><div class="ttdeci">uint8_t * data</div><div class="ttdoc">first byte of payload, if any</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00297">pdu.h:297</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_a9b6c14a84f46820634c4dd3059c73b20"><div class="ttname"><a href="structcoap__pdu__t.html#a9b6c14a84f46820634c4dd3059c73b20">coap_pdu_t::max_delta</a></div><div class="ttdeci">uint16_t max_delta</div><div class="ttdoc">highest option number</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00292">pdu.h:292</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_ac5018459a3078a5b896119d7464cb273"><div class="ttname"><a href="structcoap__pdu__t.html#ac5018459a3078a5b896119d7464cb273">coap_pdu_t::used_size</a></div><div class="ttdeci">size_t used_size</div><div class="ttdoc">used bytes of storage for token, options and payload</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00294">pdu.h:294</a></div></div>
<div class="ttc" id="astructcoap__pdu__t_html_ad526a13d4c00b670d67f557245c2236c"><div class="ttname"><a href="structcoap__pdu__t.html#ad526a13d4c00b670d67f557245c2236c">coap_pdu_t::alloc_size</a></div><div class="ttdeci">size_t alloc_size</div><div class="ttdoc">allocated storage for token, options and payload</div><div class="ttdef"><b>Definition</b> <a href="pdu_8h_source.html#l00293">pdu.h:293</a></div></div>
<div class="ttc" id="astructcoap__session__t_html"><div class="ttname"><a href="structcoap__session__t.html">coap_session_t</a></div><div class="ttdef"><b>Definition</b> <a href="coap__session_8h_source.html#l00056">coap_session.h:56</a></div></div>
<div class="ttc" id="auri_8h_html"><div class="ttname"><a href="uri_8h.html">uri.h</a></div></div>
<div class="ttc" id="authash_8h_html_aba7bc1797add20fe3efdf37ced1182c5"><div class="ttname"><a href="uthash_8h.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a></div><div class="ttdeci">unsigned char uint8_t</div><div class="ttdef"><b>Definition</b> <a href="uthash_8h_source.html#l00079">uthash.h:79</a></div></div>
</div><!-- fragment --></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li><li class="navelem"><a class="el" href="dir_a14d23a24002734ac2a3b997119f008e.html">coap2</a></li><li class="navelem"><a class="el" href="pdu_8h.html">pdu.h</a></li>
    <li class="footer">Generated on Fri Dec 27 2024 09:57:44 for libcoap by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8 </li>
  </ul>
</div>
</body>
</html>
